package com.gr.dmbackend.controller.dormaddmin;

import com.alibaba.fastjson.JSONObject;
import com.gr.dmbackend.service.dormaddmin.SearchStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SearchStudentController {

    @Autowired
    private SearchStudentService searchStudentService;

    @GetMapping("/api/dormaddmin/search-student")
    public JSONObject searchStudent(@RequestParam String searchContent, @RequestParam int page) {
        return searchStudentService.searchStudent(searchContent, page);
    }

}
